Skip to content

test(core): make the orgtrack suite portable to Windows - #697

Merged
Neonforge98 merged 1 commit into
developfrom
fix/windows-test-portability
Aug 6, 2026
Merged

test(core): make the orgtrack suite portable to Windows#697
Neonforge98 merged 1 commit into
developfrom
fix/windows-test-portability

Conversation

@Neonforge98

Copy link
Copy Markdown
Collaborator

Problem

Windows runs of cargo test -p orgtrack_core --lib carried a permanent 8-failure baseline (7 copilot, 1 kimi) plus a clippy -D warnings failure, so local verification and real-machine test protocols on Windows could not distinguish new regressions from environment noise.

Solution

All three are test-portability fixes; no production code changes.

  • copilot: the shared fixture builder created the literal macOS draft-dir shape pending-session:draft:<uuid> — NTFS cannot create names containing :. Unix keeps the provider-exact literal; Windows exercises the same not-a-plain-session-id rejection through a legal separator.
  • kimi: kimi_code_home_override_stays_inside_external_history_identity used unix-rooted absolute fixture paths, which are not is_absolute on Windows and silently exercised the fallback branch instead of the inside-home acceptance branch. Fixtures now derive platform-absolute paths from temp_dir.
  • scan_snapshot_tests: UNIX_EPOCH was imported at the top level but only used inside a #[cfg(unix)] test; the import moves inside the gate, unblocking -D warnings.

Verification

  • Windows: cargo test -p orgtrack_core --lib — 537 passed, 0 failed, 8 ignored (first fully green Windows run).
  • Windows: cargo clippy -p orgtrack_core --all-targets -- -D warnings — clean.
  • The unix-only branches (the literal : draft shape, the symlink walker test) remain gated exactly as before, so macOS/Linux coverage is unchanged.

Three fixtures assumed unix filesystem semantics, leaving 8 tests and
clippy -D warnings permanently red on Windows and burying real
regressions in a known-failure baseline:

- The copilot fixture created the literal macOS draft-dir shape
  `pending-session:draft:<uuid>`; NTFS reserves ':' for alternate data
  streams, so the shared builder failed all seven copilot tests. Unix
  keeps the provider-exact shape; Windows exercises the same
  not-a-plain-session-id rejection with a legal separator.
- The kimi home-override test used unix-rooted absolute paths, which are
  not absolute on Windows and silently routed the inside-home case
  through the fallback branch. Fixtures now derive platform-absolute
  paths from temp_dir.
- UNIX_EPOCH was imported at scan_snapshot_tests top level but only used
  inside a cfg(unix) test; the import moves inside the gate.

cargo test -p orgtrack_core --lib: 537 passed / 0 failed on Windows.
cargo clippy -p orgtrack_core --all-targets -- -D warnings: clean.

Pre-commit hook ran. Total eslint: 18, total circular: 0
@Neonforge98
Neonforge98 merged commit 4884af7 into develop Aug 6, 2026
3 checks passed
@Neonforge98
Neonforge98 deleted the fix/windows-test-portability branch August 6, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant